﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;

namespace AuthApi.Contracts
{
    [Serializable]
    [DataContract]
    public class AdUser
    {
        public AdUser()
        {
            Roles = new List<RoleIncluded>();
            Operations = new List<OperationIncluded>();            
        }

        [DataMember]
        public long Id { get; set; }

        [DataMember]
        public string UserName { get; set; }

        [DataMember]
        public string Password { get; set; }

        [DataMember]
        public string GivenName { get; set; }

        [DataMember]
        public bool HasPassword { get; set; }

        [DataMember]
        public int ApplicationId { get; set; }

        [DataMember]
        public string ApplicationName { get; set; }

        [DataMember]
        public bool UsuarioEnAplicacion { get; set; }

        [DataMember]
        public int CompanyId { get; set; }        

        [DataMember]
        public bool Blocked { get; set; }

        [DataMember]
        public DateTime? BlockedDate { get; set; }

        [DataMember]
        public DateTime? UnBlockedDate { get; set; }

        [DataMember]
        public List<RoleIncluded> Roles { get; set; }

        [DataMember]
        public List<OperationIncluded> Operations { get; set; }
    }
}
